//标准输入输出
//IODemo5.java
import java.io.*;
public class IODemo5
{
	public static void main(String[] args)
	{
		int i;
		byte[] s=new byte[100];
		try
		{
			DataInputStream in=new DataInputStream(System.in);
			i=0;
			System.out.println("please input and press enter when finished");
			in.read(s);
			System.out.println();
			System.out.println("begin to print input");
			while (s[i]!=0)
			{
				System.out.print((char)(s[i])); //System.out.println((char)(s[i]));
				i++;
			}
			System.out.println("TOTAL="+i);
			in.close();
			PrintWriter out=new PrintWriter(System.out);
			out.println("Hello,I am\n BEST");
			out.close();
		}
		catch (Exception e)
		{
		}
		try
		{
			System.in.read();
		}
		catch (Exception e)
		{
		}
	}
};